﻿using System;
using System.Collections;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using SharppiFlowEditor.models;
using SharppiFlowEditor.views;

namespace SharppiFlowEditor.controllers
{
    public abstract class AbstractController : DiagramController
    {

        private AppModel model = null;
        private views.AppView view = null;
        protected Point scrollOffset;
        protected double zoomValue;

        /*
         * Get and set the controlled view.
         */
        protected views.AppView View
        {
            get { return view; }
            set
            {
                view = value;
            }
        }

        /*
         * Get the controlled model.
         */
        protected AppModel Model
        {
            get { return model; }
            set { model = value; }
        }

        public virtual void setMode(int newMode) { }


        //public virtual int Mode(int newMode)
        //{ return Int32.MinValue; }
        /*
         * Draw the possible temporary image.
         */
        virtual public void DrawTempImage(Graphics g) { }

        /*
         * The mouse event handlers.
         */
        virtual public void ViewMouseDown(object sender, MouseEventArgs e) { }
        virtual public void ViewMouseMove(object sender, MouseEventArgs e) { }
        virtual public void ViewMouseUp(object sender, MouseEventArgs e) { }
        
    }
}
